public class Car {
	static String color;
	// statichen inicializacionen blok, zadava nachalni stoinosti samo za
	// statichnite promenlivi

	public final int MAX_SPEED = 250;
	static int maxSpeed;
	private String model;
	int currentSpeed;
	int wantedMoney;

	void setModel(String model) throws CarException {
		 if (model!=null)
			this.model = model;
			else 
				throw new CarException();
				//new IllegalArgumentException("Ne si zadal model be, budalla!");
		// InvalidParameterException
		//if (model == null)
		
		//
	//	System.out.println(this.model);
	}

	// getterfor field model
	String getModel() {
		return model;
	}

	// setter for field model
	void setMaxSpeed(int newMaxSpeed) {
		if (newMaxSpeed > 0)
			maxSpeed = newMaxSpeed;
	}

	// setterfor field price
	int getMaxSpeed() {
		return maxSpeed;
	}

	Car() {
		// jaguar = new Car();
		color = "gold";
	}

	public static void main(String[] args) {
	new	Car().setModel(null);
		}
	}

